package com.example.servicioservidor;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;


import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import android.widget.Button;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;

public class Servicio extends Service {

	public static List<Intent> intentList = new ArrayList<Intent>();
	public static Map<String,Object> m1;
	public static String aux;
	public int segundos;
	public void onCreate() {
		super.onCreate();
		
	}

	

	public void onDestroy() {
		super.onDestroy();
	}

	IMiRemoto.Stub myStub = new IMiRemoto.Stub() {

		public String getResultado() throws RemoteException {
			return Calendar.getInstance().getTimeInMillis() + "";
		}

		public String getRetonar() throws RemoteException {
				
			return aux;
		}

		public boolean sendMensaje(Map p1) throws RemoteException {
			m1=p1;
			return true;
		}

		

	};

	public IBinder onBind(Intent intent) {
		if (!intentList.contains(intent))
			intentList.add(intent);
		return myStub;
	}

}
